package com.usian.feign;

import com.usian.pojo.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "usian-sso-service")
public interface SsoFeign {

    @RequestMapping("checkUserInfo/{checkValue}/{checkFlag}")
    public boolean checkUserInfo(@PathVariable String checkValue,
                                @PathVariable int checkFlag);

    @RequestMapping("userRegister")
    public boolean userRegister(@RequestBody TbUser tbUser);

    @RequestMapping("userLogin")
    public Map userLogin(@RequestParam String username, @RequestParam String password);

    @RequestMapping("getUserByToken/{token}")
    public boolean getUserByToken(@PathVariable  String token);
}
